package com.example.expandablelistviewmodule

import android.database.DataSetObserver
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.view.ViewGroup
import android.widget.ExpandableListAdapter
import android.widget.ExpandableListView

class MainActivity : AppCompatActivity() {
	val groupNames = arrayOf("好友", "同学")
	val childNames = arrayOf(
		arrayOf(
			"张学友", "周润发", "周星驰", "成龙"
		), arrayOf("马云", "王健林")
	)

	private  lateinit var expandableListView:ExpandableListView
	override fun onCreate(savedInstanceState: Bundle?) {
		super.onCreate(savedInstanceState)
		setContentView(R.layout.activity_main)
		this.expandableListView=findViewById(R.id.expandable_listview)
		this.expandableListView.setAdapter(object:ExpandableListAdapter{
			override fun registerDataSetObserver(observer: DataSetObserver?) {
//				TODO("Not yet implemented")
			}

			override fun unregisterDataSetObserver(observer: DataSetObserver?) {
//				TODO("Not yet implemented")
			}

			override fun getGroupCount(): Int {
				TODO("Not yet implemented")
			}

			override fun getChildrenCount(groupPosition: Int): Int {
				TODO("Not yet implemented")
			}

			override fun getGroup(groupPosition: Int): Any {
				TODO("Not yet implemented")
			}

			override fun getChild(groupPosition: Int, childPosition: Int): Any {
				TODO("Not yet implemented")
			}

			override fun getGroupId(groupPosition: Int): Long {
				TODO("Not yet implemented")
			}

			override fun getChildId(groupPosition: Int, childPosition: Int): Long {
				TODO("Not yet implemented")
			}

			override fun hasStableIds(): Boolean {
				TODO("Not yet implemented")
			}

			override fun getGroupView(
				groupPosition: Int,
				isExpanded: Boolean,
				convertView: View?,
				parent: ViewGroup?
			): View {
				TODO("Not yet implemented")
			}

			override fun getChildView(
				groupPosition: Int,
				childPosition: Int,
				isLastChild: Boolean,
				convertView: View?,
				parent: ViewGroup?
			): View {
				TODO("Not yet implemented")
			}

			override fun isChildSelectable(groupPosition: Int, childPosition: Int): Boolean {
				TODO("Not yet implemented")
			}

			override fun areAllItemsEnabled(): Boolean {
				TODO("Not yet implemented")
			}

			override fun isEmpty(): Boolean {
				TODO("Not yet implemented")
			}

			override fun onGroupExpanded(groupPosition: Int) {
				TODO("Not yet implemented")
			}

			override fun onGroupCollapsed(groupPosition: Int) {
				TODO("Not yet implemented")
			}

			override fun getCombinedChildId(groupId: Long, childId: Long): Long {
				TODO("Not yet implemented")
			}

			override fun getCombinedGroupId(groupId: Long): Long {
				TODO("Not yet implemented")
			}

		})
	}
}